<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript">
        window.onload = function(){
            var a = document.getElementById("123");
            a.onsubmit = function(){
                alert("已经提交！");
            }
        }
    </script>
</head>
<body>
    <form action="https://so.csdn.net/so/search?q=html%20method&t=&u=&utm_term=html%20method&utm_medium=distribute.pc_toolbar_associateword.none-task-associate_word-opensearch_query-1-html%20method.nonecase&depth_1-utm_source=distribute.pc_toolbar_associateword.none-task-associate_word-opensearch_query-1-html%20method.nonecase&request_id=163758428116780366564550&opensearch_request_id=163758428116780366564550" method="get" id="123">
              <input type="submit">
    <!-- ruturn flase可以阻止表单提交！ -->
    <!-- ruturn ture可以使表单正常提交！ -->
    </form>
</body>
</html>